#!/bin/sh

for dev in `ls /dev/mapper/bw*`
do
	dmsetup remove $dev
done

for dev in `ls /dev/mapper/sb*`
do
	dmsetup remove $dev
done

for dev in `ls /dev/mapper/data*`
do
	dmsetup remove $dev
done

mdadm -S /dev/md*

for dev in `ls /dev/mapper/bw*`
do
	dmsetup remove $dev
done

for dev in `ls /dev/mapper/sb*`
do
	dmsetup remove $dev
done

for dev in `ls /dev/mapper/data*`
do
	dmsetup remove $dev
done

mdadm -S /dev/md*


for dev in `ls /dev/mapper/bw*`
do
	dmsetup remove $dev
done

mdadm -S /dev/md*

for dev in `ls /dev/mapper/bw*`
do
	dmsetup remove $dev
done

for dev in `ls /dev/mapper/sb*`
do
	dmsetup remove $dev
done

for dev in `ls /dev/mapper/data*`
do
	dmsetup remove $dev
done
for dev in `ls /dev/mapper/bw*`
do
	dmsetup remove $dev
done

for dev in `ls /dev/mapper/bw*`
do
	dmsetup remove $dev
done

for dev in `ls /dev/mapper/bw*`
do
	dmsetup remove $dev
done

rm /dev/bw_vg0_v* -rf

